fix(scanner): include adjudicator token usage - #151
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Adjudicator now tracks LLM token usage for each run. ChangesAdjudicator LLM usage aggregation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant SkillScanner
participant Adjudicator
participant LLMProvider
participant ScanResult
SkillScanner->>Adjudicator: run adjudication
Adjudicator->>LLMProvider: request adjudication
LLMProvider-->>Adjudicator: response with token usage
Adjudicator-->>SkillScanner: return or raise
SkillScanner->>SkillScanner: add usage in finally
SkillScanner->>ScanResult: emit aggregate llm_usage
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/output-formats.md`:
- Line 114: Correct the llm_usage documentation to state that the field is
included only when non-zero provider usage is reported, rather than whenever an
LLM call is made; alternatively, update the scanner’s usage aggregation to track
executed calls and preserve the documented call-based presence condition.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e2b51637-1a0b-4c64-a222-4afcc7b1ca24
📒 Files selected for processing (5)
docs/architecture/analyzers/adjudicator.mddocs/reference/output-formats.mdskill_scanner/core/analyzers/adjudicator.pyskill_scanner/core/scanner.pytests/test_adjudicator.py
What changed
ScanResult.llm_usageWhy
PR #146 aggregated the regular LLM and meta-analyzer token usage, but PR #139's adjudicator calls LiteLLM directly and its usage was not included. Scans with
--adjudicatetherefore under-reported total LLM consumption.Validation
Summary by CodeRabbit